package com.se2.antiqueexhibition.Service.impl;

import com.se2.antiqueexhibition.Mapper.AdminReservationMapper;
import com.se2.antiqueexhibition.Service.AdminReservationService;
import com.se2.antiqueexhibition.pojo.AdminReservation;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminReservationServiceimpl implements AdminReservationService {

    @Resource
    private AdminReservationMapper adminReservationMapper;

    @Override
    public void insert(AdminReservation a) {
        adminReservationMapper.insert(a);

    }

    @Override
    public void update(AdminReservation a) {
        adminReservationMapper.update(a);
    }

    @Override
    public void delete(int id) {
        adminReservationMapper.delete(id);
    }

    @Override
    public List<AdminReservation> getAllReservations() {
        return adminReservationMapper.selectAll();
    }

    @Override
    public AdminReservation getAdminReservationById(int id) {
        return null;
    }

    @Override
    public void updateStatus(int id, int status) {
        adminReservationMapper.updateStatus(id,status);

    }
}
